package com.ruoyi.system.domain.dao;

import com.baomidou.mybatisplus.annotation.*;
import com.eic.framework.core.annotation.InsertTime;
import com.eic.framework.core.annotation.InsertUser;
import com.eic.framework.core.annotation.UpdateTime;
import com.eic.framework.core.annotation.UpdateUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;

/**
 * 部门对象 sys_dept
 * 
 * @author 尹国春
 * @date 2022-07-25
 */
@ApiModel("部门对象")
@TableName("sys_dept")
public class SysDept implements Serializable
{
    private static final long serialVersionUID = 1L;

    /**  */
    @ApiModelProperty(value = "主键ID")
    @TableId(value = "dept_id",type = IdType.INPUT)
    private String deptId;

    /** 父部门id */
    @Excel(name = "父部门id")
    @ApiModelProperty(value = "父部门id")
    @TableField("parent_id")
    private String parentId;

    /** 祖级列表 */
    @Excel(name = "祖级列表")
    @ApiModelProperty(value = "祖级列表")
    @TableField("ancestors")
    private String ancestors;

    /** 部门名称 */
    @Excel(name = "部门名称")
    @ApiModelProperty(value = "部门名称")
    @TableField("dept_name")
    private String deptName;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    @ApiModelProperty(value = "显示顺序")
    @TableField("order_num")
    private Long orderNum;

    /** 负责人 */
    @Excel(name = "负责人")
    @ApiModelProperty(value = "负责人")
    @TableField("leader")
    private String leader;

    /** 联系电话 */
    @Excel(name = "联系电话")
    @ApiModelProperty(value = "联系电话")
    @TableField("phone")
    private String phone;

    /** 邮箱 */
    @Excel(name = "邮箱")
    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    /** 部门状态（0正常 1停用） */
    @ApiModelProperty(value = "部门状态（0正常 1停用）")
    @TableField("status")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    @ApiModelProperty(hidden = true)
    @TableField("del_flag")
    @JsonIgnore
    @TableLogic
    private String delFlag;

    /** 创建者 */
    @ApiModelProperty(hidden = true)
    @TableField("create_by")
    @InsertUser
    private String createBy;

    /** 创建时间 */
    @ApiModelProperty(hidden = true)
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @InsertTime
    private Date createTime;

    /** 更新者 */
    @ApiModelProperty(hidden = true)
    @TableField("update_by")
    @UpdateUser
    private String updateBy;

    /** 更新时间 */
    @ApiModelProperty(hidden = true)
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @UpdateTime
    private Date updateTime;

    public SysDept setDeptId(String deptId)
    {
        this.deptId = deptId;
        return this;
    }
    public String getDeptId()
    {
        return deptId;
    }
    public SysDept setParentId(String parentId)
    {
        this.parentId = parentId;
        return this;
    }
    public String getParentId()
    {
        return parentId;
    }
    public SysDept setAncestors(String ancestors)
    {
        this.ancestors = ancestors;
        return this;
    }
    public String getAncestors()
    {
        return ancestors;
    }
    public SysDept setDeptName(String deptName)
    {
        this.deptName = deptName;
        return this;
    }
    public String getDeptName()
    {
        return deptName;
    }
    public SysDept setOrderNum(Long orderNum)
    {
        this.orderNum = orderNum;
        return this;
    }
    public Long getOrderNum()
    {
        return orderNum;
    }
    public SysDept setLeader(String leader)
    {
        this.leader = leader;
        return this;
    }
    public String getLeader()
    {
        return leader;
    }
    public SysDept setPhone(String phone)
    {
        this.phone = phone;
        return this;
    }
    public String getPhone()
    {
        return phone;
    }
    public SysDept setEmail(String email)
    {
        this.email = email;
        return this;
    }
    public String getEmail()
    {
        return email;
    }
    public SysDept setStatus(String status)
    {
        this.status = status;
        return this;
    }
    public String getStatus()
    {
        return status;
    }
    public SysDept setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
        return this;
    }
    public String getDelFlag()
    {
        return delFlag;
    }
    public SysDept setCreateBy(String createBy)
    {
        this.createBy = createBy;
        return this;
    }
    public String getCreateBy()
    {
        return createBy;
    }
    public SysDept setCreateTime(Date createTime)
    {
        this.createTime = createTime;
        return this;
    }
    public Date getCreateTime()
    {
        return createTime;
    }
    public SysDept setUpdateBy(String updateBy)
    {
        this.updateBy = updateBy;
        return this;
    }
    public String getUpdateBy()
    {
        return updateBy;
    }
    public SysDept setUpdateTime(Date updateTime)
    {
        this.updateTime = updateTime;
        return this;
    }
    public Date getUpdateTime()
    {
        return updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.SHORT_PREFIX_STYLE)
            .append("deptId", getDeptId())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .append("deptName", getDeptName())
            .append("orderNum", getOrderNum())
            .append("leader", getLeader())
            .append("phone", getPhone())
            .append("email", getEmail())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
